home *** CD-ROM | disk | FTP | other *** search
/ PC-Blue - MS DOS Public Domain Library / PC-Blue MS-DOS Public Domain Library - NYACC.iso / vol058 / creatmar.bas (.txt) < prev    next >
Encoding:
GW-BASIC  |  1987-01-13  |  2.9 KB  |  99 lines

  1. 100  TITLE$ = "Marriage File Creation Program"
  2. 105  TITLE$ = TITLE$ + " ON DISPLAY"
  3. 110  VERSION$ = "Version 1.3"
  4. 115  COPY1$ = "Copyright (c) 1983, by:"
  5. 120  COPY2$ = "Melvin O. Duke"
  6. 125  PRICE$ = "$35"
  7. 130  ADDR1$ = "Melvin O. Duke"
  8. 135  ADDR2$ = "P. O. Box 20836"
  9. 140  ADDR3$ = "San Jose, CA  95160"
  10. 145  REM Dimension Statements go here
  11. 170  REM Produce the first screen
  12. 175  KEY OFF : CLS
  13. 180  REM Draw the outer double box
  14. 185  R1 = 1 : C1 = 1 : R2 = 24 : C2 = 79 : GOSUB 400
  15. 190  REM Find the title location
  16. 195  TITLE.POS = 40 - INT(LEN(TITLE$)/2)
  17. 200  REM Draw the title box
  18. 205  R1=3:C1=TITLE.POS-2:R2=6:C2=TITLE.POS+LEN(TITLE$)+1:GOSUB 600
  19. 210  REM Print the title
  20. 215  LOCATE 4,TITLE.POS : PRINT TITLE$
  21. 220  LOCATE 5,40-INT(LEN(VERSION$)/2) :  PRINT VERSION$;
  22. 225  REM Draw the Contribution box
  23. 230  R1 = 8 : C1 = 19 : R2 = 17 : C2 = 62 : GOSUB 400
  24. 235  REM Request the Contribution
  25. 240  LOCATE 9,23 : PRINT "If you are using these programs, and"
  26. 245  LOCATE 10,21 : PRINT "finding them of value, your contribution"
  27. 250  LOCATE 11,23 : PRINT "("+PRICE$+" suggested) will be appreciated."
  28. 255  REM Draw the Mailing Label
  29. 260  R1 = 12 : C1 = 28 : R2 = 16 : C2 = 52 : GOSUB 600
  30. 265  REM Print the Name and Address
  31. 270  LOCATE 13,40-INT(LEN(ADDR1$)/2) :  PRINT ADDR1$;
  32. 275  LOCATE 14,40-INT(LEN(ADDR2$)/2) :  PRINT ADDR2$;
  33. 280  LOCATE 15,40-INT(LEN(ADDR3$)/2) :  PRINT ADDR3$;
  34. 285  REM Draw the Copyright box
  35. 290  R1 = 19 : C1 = 27 : R2 = 22 : C2 = 53 : GOSUB 400
  36. 295  REM Print the Copyright
  37. 300  LOCATE 20,40-INT(LEN(COPY1$)/2) :  PRINT COPY1$;
  38. 305  LOCATE 21,40-INT(LEN(COPY2$)/2) :  PRINT COPY2$;
  39. 310  GOTO 740
  40. 400  REM subroutine to print a double box
  41. 410  FOR I = R1 + 1 TO R2 - 1
  42. 420   LOCATE I, C1 : PRINT CHR$(186);
  43. 430   LOCATE I, C2 : PRINT CHR$(186);
  44. 440  NEXT I
  45. 450  FOR J = C1 + 1 TO C2 - 1
  46. 460   LOCATE R1, J : PRINT CHR$(205);
  47. 470   LOCATE R2, J : PRINT CHR$(205);
  48. 480  NEXT J
  49. 490   LOCATE R1, C1 : PRINT CHR$(201);
  50. 500   LOCATE R1, C2 : PRINT CHR$(187);
  51. 510   LOCATE R2, C1 : PRINT CHR$(200);
  52. 520   LOCATE R2, C2 : PRINT CHR$(188);
  53. 530  RETURN
  54. 600  REM subroutine to print a single box
  55. 610  FOR I = R1 + 1 TO R2 - 1
  56. 620   LOCATE I, C1 : PRINT CHR$(179);
  57. 630   LOCATE I, C2 : PRINT CHR$(179);
  58. 640  NEXT I
  59. 650  FOR J = C1 + 1 TO C2 - 1
  60. 660   LOCATE R1, J : PRINT CHR$(196);
  61. 670   LOCATE R2, J : PRINT CHR$(196);
  62. 680  NEXT J
  63. 690   LOCATE R1, C1 : PRINT CHR$(218);
  64. 700   LOCATE R1, C2 : PRINT CHR$(191);
  65. 710   LOCATE R2, C1 : PRINT CHR$(192);
  66. 720   LOCATE R2, C2 : PRINT CHR$(217);
  67. 730  RETURN
  68. 740  REM ask user to press a key to continue
  69. 750  LOCATE 25,1
  70. 760  PRINT "Press any key to continue";
  71. 770  K$ = INKEY$ : IF K$ = "" THEN 770
  72. 780  CLS
  73. 1000  REM Marriage File Creation Program
  74. 1010  REM By:  Melvin O. Duke.  Updated 26 June, 1983.
  75. 1020  OPEN "a:marrfile" AS #2 LEN = 128
  76. 1030  FIELD 2, 5 AS M1$, 5 AS M2$, 5 AS M3$, 5 AS M4$, 11 AS M5$, 18 AS M6$, 16 AS M7$, 16 AS M8$, 45 AS M9$
  77. 1040  REM Write 200 Marriage Records
  78. 1050  CLS
  79. 1060  FOR I = 1 TO 200
  80. 1070   LOCATE 22,1 : PRINT "Writing Record:"; I
  81. 1080   TEMP = -I
  82. 1090   LSET M1$ = MKS$(TEMP)
  83. 1100   TEMP = 0
  84. 1110   LSET M2$ = MKS$(TEMP)
  85. 1120   LSET M3$ = MKS$(TEMP)
  86. 1130   LSET M4$ = MKS$(TEMP)
  87. 1140   TEMP$ = " "
  88. 1150   LSET M5$ = TEMP$
  89. 1160   LSET M6$ = TEMP$
  90. 1170   LSET M7$ = TEMP$
  91. 1180   LSET M8$ = TEMP$
  92. 1190   LSET M9$ = TEMP$
  93. 1200   PUT #2, I
  94. 1210  NEXT I
  95. 1220  CLOSE #2
  96. 1230  CLS : LOCATE 21,1
  97. 1240  PRINT "End of Program"
  98. 1250  END
  99.